﻿using System;
using System.Collections.Generic;
using System.Threading;

namespace InhVsCoup
{
    class MailServer
    {
        private readonly ILogger _logger;

        public MailServer(ILogger logger)
        {
            _logger = logger;
        }

        public void SendEmails(List<string> mailList, string message)
        {
            try
            {
                _logger.LogInfo("Send Emails Start");
                //Отправить письма
                Thread.Sleep(3000);
                throw new ApplicationException();
                _logger.LogInfo("Send mails finish");
            }
            catch (Exception)
            {
                
                _logger.LogError("SendEmails Fail");
            }


        }
    }
}